/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bakenote.ui;

import org.apache.pivot.beans.BXMLSerializer;
import org.apache.pivot.collections.Map;
import org.apache.pivot.wtk.Application;
import org.apache.pivot.wtk.Display;

/**
 *
 * @author lello
 */
public class ErrorOpen implements Application {

	private static ErrorOpenWindow errorOpenWindow = null;
	private static BXMLSerializer bxmlSerializer = new BXMLSerializer();

	public ErrorOpen() { }

	public void startup(Display dspl, Map<String, String> map) throws Exception {
		errorOpenWindow = (ErrorOpenWindow) bxmlSerializer.readObject(ErrorOpen.class, "error_open_window.bxml");
		errorOpenWindow.open(dspl);
	}

	public boolean shutdown(boolean bln) throws Exception {
		errorOpenWindow.getDisplay().getHostWindow().dispose();
		return false;
	}

	public void suspend() throws Exception {
		errorOpenWindow.getDisplay().getHostWindow().dispose();
	}

	public void resume() throws Exception {
		// No-op
	}

}
